/*
 * @Author: your name
 * @Date: 2020-10-27 13:23:41
 * @LastEditTime: 2020-11-09 16:13:39
 * @LastEditors: your name
 * @Description: In User Settings Edit
 * @FilePath: \wms2-oms\src\views\purchaseAndSale\list_management\components\myMixin.js
 */
/**
 * @author deep1nBlur
 * @email mailbrcee@gmail.com
 * @create date 2020-10-24 09:04:02
 * @modify date 2020-10-26 15:13:45
 * @desc [混入 用于存储固定的数据格式 日期范围选择器 /下拉框选项]
 */
export default {
  data: () => ({
    pickerOptions: {
      shortcuts: [{
          text: "最近一周",
          onClick(picker) {
            const end = new Date();
            const start = new Date();
            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
            picker.$emit("pick", [start, end]);
          },
        },
        {
          text: "最近一个月",
          onClick(picker) {
            const end = new Date();
            const start = new Date();
            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
            picker.$emit("pick", [start, end]);
          },
        },
        {
          text: "最近三个月",
          onClick(picker) {
            const end = new Date();
            const start = new Date();
            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
            picker.$emit("pick", [start, end]);
          },
        },
      ],
    },
    statusList: [{
        value: "NEWS",
        label: "新增",
      },
      {
        value: "ANNUL",
        label: "作废",
      },
      {
        value: "PENDING",
        label: "待审核",
      },
      {
        value: "NO_PASS",
        label: "审核未通过",
      },
      {
        value: "PASS",
        label: "审核通过",
      },
    ],
    gmtPlanArrival: "",
    gmtCreated: "",
    gmtModified: "",
    statusArr: {
      // mock
      'NEWS': '新增',
      'ANNUL': '作废',
      'PENDING': '待审核',
      'NO_PASS': '审核未通过',
      'PASS': '审核通过',
    }

  }),
  methods: {
    statusFmt({
      cellValue
    }) {
      return this.statusArr[cellValue]
      // return "状态格式化"
    }
  }
}
